package jjn.effective_java.chapter6.item34;

/**
 * @author Jiang Jining
 * @since 2023-04-26 22:29
 */
public class WeightTable {
    public static void main(String[] args) {
        double earthWeight = Double.parseDouble(args[0]);
        double mass = earthWeight / Planet.EARTH.surfaceGravity();
        for (Planet planet : Planet.values()) {
            System.out.printf("weight on %s is %f\n", planet.name(), planet.surfaceWeight(mass));
        }
    }
}
